﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master"
    CodeBehind="ViewSandCastle.aspx.vb" Inherits="BeachesInGreeceComplete.ViewSandCastle" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </ajaxToolkit:ToolkitScriptManager>
    <div class="aside2">
        <br />
        <h3>
            Vote</h3>
        <br />
        <br />
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:Button ID="btn_VoteCastle" runat="server" Text="Vote" CssClass="m-btn blue" />
                <asp:Repeater ID="rpt_Votes" runat="server" DataSourceID="SqlDataSource4">
                    <ItemTemplate>
                        •
                        <asp:Label ID="lbl_Views" runat="server" Text='<%# Eval("TotalVotes") %>' CssClass="myButton" />
                    </ItemTemplate>
                </asp:Repeater>
                <asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:BeachConnectionString %>"
                    ProviderName="<%$ ConnectionStrings:BeachConnectionString.ProviderName %>" SelectCommand="SELECT * FROM [TotalVotesPerCastle] WHERE ([ID] = ?)">
                    <SelectParameters>
                        <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </ContentTemplate>
        </asp:UpdatePanel>
        <br />
        <br />
        <asp:Button ID="btn_DelSandCastle" runat="server" Text="Delete SandCastle" CssClass="m-btn red"
            Visible="False" Enabled="False" OnClientClick="return confirm('Delete SandCastle?');" />
    </div>
    <h2 id="myHeading" runat="server">
    </h2>
    <div class="mainDiv2">
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" HorizontalAlign="Center"
            DataSourceID="SqlDataSource1">
            <Columns>
                <asp:ImageField DataImageUrlField="Picture">
                    <ControlStyle BorderStyle="Double" Height="350px" Width="400px" />
                    <HeaderStyle ForeColor="Orange" HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" />
                </asp:ImageField>
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:BeachConnectionString %>"
            ProviderName="<%$ ConnectionStrings:BeachConnectionString.ProviderName %>" SelectCommand="SELECT * FROM SandCastle WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
        <br />
    </div>
</asp:Content>
